laravel load view in variable

45

laravel load view in variable -

$html = view('users.edit', compact('user'))->render();

pass parameter to view laravel -

Route::get('/', function () {
    return view('greeting', ['name' => 'James']);
});

return view with variable laravel -

return View::make('blog')->with('posts', $posts);

laravel get view variables -

{{ dd(get_defined_vars()['__data']) }}

Comments

Submit
0 Comments